home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / The Hacks! / Interim Executive Decision / Outline Table Demo / sources / CDirectoryItem.h < prev    next >
Encoding:
Text File  |  1998-06-21  |  1.5 KB  |  59 lines  |  [TEXT/CWIE]

  1. //============================================================================
  2. // CDirectoryItem.h        ©1997 Metrowerks Inc. All rights reserved
  3. // Original author: John C. Daub
  4. //============================================================================
  5. // A concrete LOutlineItem for items of type "directory".
  6.  
  7. #pragma once
  8.  
  9. #include <LOutlineItem.h>
  10.  
  11. class CFileItem;
  12.  
  13. class CDirectoryItem : public LOutlineItem
  14. {
  15.  
  16. public:
  17.  
  18.         OSType                fSelector;
  19.         Uint32                fSubValues;
  20.         long                fNameId;
  21.         bool                fState;
  22.  
  23.                                 CDirectoryItem( int nameId, OSType selector, Uint32 subValues );
  24.         virtual                    ~CDirectoryItem();
  25.         
  26.  
  27.         virtual Boolean            CanExpand() const;
  28.  
  29. protected:
  30.  
  31.         void SetState(bool state);
  32.  
  33.         virtual void            GetDrawContentsSelf(
  34.                                     const STableCell&        inCell,
  35.                                     SOutlineDrawContents&    ioDrawContents);
  36.  
  37.         virtual void            DrawRowAdornments(
  38.                                     const Rect&                inLocalRowRect);
  39.         
  40.         virtual    void            ExpandSelf();
  41.  
  42.  
  43.         virtual void            DoubleClick(
  44.                                     const STableCell&            inCell,
  45.                                     const SMouseDownEvent&        inMouseDown,
  46.                                     const SOutlineDrawContents&    inDrawContents,
  47.                                     Boolean                        inHitText);
  48.                 
  49.     virtual void            TrackContentClick(
  50.                                     const STableCell&            inCell,
  51.                                     const SMouseDownEvent&        inMouseDown,
  52.                                     const SOutlineDrawContents&    inDrawContents,
  53.                                     Boolean                        inHitText);
  54. private:
  55.  
  56.                                 CDirectoryItem();
  57.                                 CDirectoryItem( const CDirectoryItem &inOriginal );
  58.             CDirectoryItem&        operator=( const CDirectoryItem &inOriginal );
  59. };